package com.wwinsoft.oa.pojo.plan;

import java.util.Date;

import com.wwinsoft.framework.pojo.UIDisplayInterface;
import com.wwinsoft.modules.utils.DateUtils;
import com.wwinsoft.oa.entity.plan.Workplan;

/**
 * @author: Tim Chen
 * @since 1.0
 */
public class WorkplanBean extends Workplan implements UIDisplayInterface {

    public WorkplanBean() {
        this.startTimeFrom = DateUtils.addDays(new Date(),-7);
        this.startTimeTo = new Date();
    }

    private String userName;
    private String groupName;
    private Date startTimeFrom;
    private Date startTimeTo;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public Date getStartTimeFrom() {
        return startTimeFrom;
    }

    public void setStartTimeFrom(Date startTimeFrom) {
        this.startTimeFrom = startTimeFrom;
    }

    public Date getStartTimeTo() {
        return startTimeTo;
    }

    public void setStartTimeTo(Date startTimeTo) {
        this.startTimeTo = startTimeTo;
    }

    @Override
    public boolean isOverDue() {
        return DateUtils.isOverDue(getExpectTime()) && !"2".equals(getStatus());
    }
}
